
import {
    legacy_createStore,
    applyMiddleware,
} from 'redux'
import logger from 'redux-logger';
import thunk from 'redux-thunk'
import {ALLSTORE,ALLACTION,SETLST} from '../types/store.d'

const initialState = {
    list:[]
}

const store1 = (state:ALLSTORE = initialState, { type, payload }:ALLACTION) => {
  switch (type) {

  case "first":
    return { ...state, ...payload }

  default:
    return state
  }
}


const store = legacy_createStore(store1,applyMiddleware(logger,thunk))

export default store
